<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <div>
    <div class="title">
      <img src="http://liufusong.top:8080/img/profile/bg.png" alt="" />
      <div class="info">
        <div class="icon">
          <img
            class="avatar"
            src="http://liufusong.top:8080/img/profile/avatar.png"
            alt=""
          />
        </div>
        <div class="user">
          <div class="name">用户名</div>
          <div class="login">
            <van-button
              type="primary"
              @click="$router.push('/login')"
              class="button"
              >去登录</van-button
            >
          </div>
        </div>
      </div>
    </div>
    <div class="grid">
      <van-grid :column-num="3">
        <van-grid-item icon="star-o" to="/collect" text="我的收藏" />
        <van-grid-item icon="wap-home-o" to="/myrent" text="我的出租" />
        <van-grid-item icon="clock-o" text="看房记录" />
        <van-grid-item icon="medal-o" text="成为房主" />
        <van-grid-item icon="user-o" text="个人信息" />
        <van-grid-item icon="service-o" text="联系我们" />
      </van-grid>
    </div>
    <div class="ad">
      <img src="http://liufusong.top:8080/img/profile/join.png" alt="" />
    </div>
  </div>
</template>

<script>
export default {}
</script>

<style>
* {
  box-sizing: border-box;
}
.title {
  min-height: 300px;
  position: relative;
}
.title img {
  width: 100%;
}
.info {
  position: absolute;
  background-color: #fff;
  width: 85%;
  height: 55%;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px 3px #ddd;
  margin: 50px auto 0;
  padding: 0 20px;
  text-align: center;
  font-size: 13px;
}
.info .icon {
  position: relative;
  transform: translateY(-50%);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  border: 5px solid #f5f5f5;
  display: inline-block;
  box-shadow: 0 2px 2px #bdbdbd;
}
.user {
  padding-top: 15px;
}
.user .name {
  margin-top: -30px;
  margin-bottom: 10px;
}
.user .login {
  color: #999;
  font-size: 12px;
  margin-top: 20px;
}
.user .login .button {
  font-size: 13px;
  height: 30px;
  line-height: 30px;
  padding: 0 15px;
}
.grid {
  margin-top: 10px;
}
.ad {
  text-align: center;
  margin-top: 10px;
}
.ad img {
  width: 92%;
}
</style>
